package rolesystem.roles.auction;

import java.io.Serializable;

/**
 * This class represents the situation of an auction.
 * Instances of this class are constant, once created they
 * cannot be changed.
 */
public class Situation implements Serializable
{
	/**
	 * Price proposed for good.
	 */
	private Price price;

	/**
	 * Current winning bidder.
	 */
	private int winnBidder;

	/**
	 * Current situation of countdown (ticks to end).
	 */
	private int countdown;


	/**
	 * Constructor with no arguments, for
	 * serializability.
	 */
	private Situation()
	{
	}


	/**
	 * @param price Price proposed for good.
	 * @param winnBidder Current winning bidder.
	 * @param countdown Current situation of countdown
	 * (ticks to end).
	 */
	public Situation(Price price, int winnBidder, int countdown)
	{
		this.price=price;
		this.winnBidder=winnBidder;
		this.countdown=countdown;
	}


	/**
	 * Returns the price proposed for good.
	 * @return The price proposed for good.
	 */
	public Price getPrice()
	{
		return price;
	}


	/**
	 * Returns the current winning bidder.
	 * @return The current winning bidder.
	 */
	public int getWinnBidder()
	{
		return winnBidder;
	}


	/**
	 * Returns the current situation of countdown.
	 * @return The current situation of countdown.
	 */
	public int getCountdown()
	{
		return countdown;
	}
}
